package com.ssy.lingxi.purchase.repository.needplan;

import com.ssy.lingxi.purchase.entity.needplan.NeedPlanDetail;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 需求计划明细DB操作类
 * */
@Repository
public interface NeedPlanDetailRepository extends JpaRepository<NeedPlanDetail, Long>, JpaSpecificationExecutor<NeedPlanDetail> {

    Page<NeedPlanDetail> findByNeedPlanId(Long id, Pageable pageable);

    List<NeedPlanDetail> findByNeedPlanId(Long id);

    void deleteByNeedPlanId(Long id);

    List<NeedPlanDetail> findByNeedPlanIdIn(List<Long> idList);
}
